using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._NetworkDiagramTools._Configuration
{
    /// <summary>
    /// <para>Add Reduce Edge By Attribute Rule</para>
    /// <para>Adds a diagram rule to automatically reduce diagram edges during diagram building  based on an existing template.
    /// This rule can be set up to reduce diagram edges by attributes.</para>
    /// <para>添加逻辑示意图规则，以在基于现有模板构建逻辑示意图时自动减少逻辑示意图边缘。
    /// 可以设置此规则以按属性减少逻辑示意图边缘。</para>
    /// </summary>    
    [DisplayName("Add Reduce Edge By Attribute Rule")]
    public class AddReduceEdgeByAttributeRule : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public AddReduceEdgeByAttributeRule()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_utility_network">
        /// <para>Input Network</para>
        /// <para>The utility network or trace network containing the diagram template to modify.</para>
        /// <para>包含要修改的逻辑示意图模板的公共设施网络或追踪网络。</para>
        /// </param>
        /// <param name="_template_name">
        /// <para>Input Diagram Template</para>
        /// <para>The name of the diagram template to modify.</para>
        /// <para>要修改的逻辑示意图模板的名称。</para>
        /// </param>
        /// <param name="_is_active">
        /// <para>Active</para>
        /// <para><xdoc>
        ///   <para>Specifies whether the rule will be active when generating and updating diagrams based on the specified template.
        ///   <bulletList>
        ///     <bullet_item>Checked—The added rule will become active during the generation and update of any diagrams based on the input template. This is the default.  </bullet_item><para/>
        ///     <bullet_item>Unchecked—The added rule will not become active during the generation or update of any diagrams based on the input template.  </bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para><xdoc>
        /// <para>指定在基于指定模板生成和更新关系图时，规则是否处于活动状态。
        ///   <bulletList>
        ///     <bullet_item>选中 - 在基于输入模板生成和更新任何逻辑示意图期间，添加的规则将变为活动状态。这是默认设置。 </bullet_item><para/>
        ///     <bullet_item>未选中 - 在基于输入模板生成或更新任何逻辑示意图期间，添加的规则将不会变为活动状态。</bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// </param>
        /// <param name="_network_source">
        /// <para>Edge Source to Reduce</para>
        /// <para>The network edge source class or object table to reduce. All diagram edges related to network lines or edge objects that belong to this source class or object table are candidates for the reduction.</para>
        /// <para>要减少的网络边源类或对象表。与属于此源类或对象表的网络线或边对象相关的所有逻辑示意图边都是缩减的候选项。</para>
        /// </param>
        public AddReduceEdgeByAttributeRule(object _in_utility_network, object _template_name, _is_active_value _is_active, object _network_source)
        {
            this._in_utility_network = _in_utility_network;
            this._template_name = _template_name;
            this._is_active = _is_active;
            this._network_source = _network_source;
        }
        public override string ToolboxName => "Network Diagram Tools";

        public override string ToolName => "Add Reduce Edge By Attribute Rule";

        public override string CallName => "nd.AddReduceEdgeByAttributeRule";

        public override List<string> AcceptEnvironments => [];

        public override object[] ParameterInfo => [_in_utility_network, _template_name, _is_active.GetGPValue(), _network_source, _where_clause, _description, _out_utility_network, _out_template_name, _reconnected_edges_option.GetGPValue()];

        /// <summary>
        /// <para>Input Network</para>
        /// <para>The utility network or trace network containing the diagram template to modify.</para>
        /// <para>包含要修改的逻辑示意图模板的公共设施网络或追踪网络。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Network")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_utility_network { get; set; }


        /// <summary>
        /// <para>Input Diagram Template</para>
        /// <para>The name of the diagram template to modify.</para>
        /// <para>要修改的逻辑示意图模板的名称。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Diagram Template")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _template_name { get; set; }


        /// <summary>
        /// <para>Active</para>
        /// <para><xdoc>
        ///   <para>Specifies whether the rule will be active when generating and updating diagrams based on the specified template.
        ///   <bulletList>
        ///     <bullet_item>Checked—The added rule will become active during the generation and update of any diagrams based on the input template. This is the default.  </bullet_item><para/>
        ///     <bullet_item>Unchecked—The added rule will not become active during the generation or update of any diagrams based on the input template.  </bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para><xdoc>
        /// <para>指定在基于指定模板生成和更新关系图时，规则是否处于活动状态。
        ///   <bulletList>
        ///     <bullet_item>选中 - 在基于输入模板生成和更新任何逻辑示意图期间，添加的规则将变为活动状态。这是默认设置。 </bullet_item><para/>
        ///     <bullet_item>未选中 - 在基于输入模板生成或更新任何逻辑示意图期间，添加的规则将不会变为活动状态。</bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Active")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public _is_active_value _is_active { get; set; }

        public enum _is_active_value
        {
            /// <summary>
            /// <para>ACTIVE</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("ACTIVE")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>INACTIVE</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("INACTIVE")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Edge Source to Reduce</para>
        /// <para>The network edge source class or object table to reduce. All diagram edges related to network lines or edge objects that belong to this source class or object table are candidates for the reduction.</para>
        /// <para>要减少的网络边源类或对象表。与属于此源类或对象表的网络线或边对象相关的所有逻辑示意图边都是缩减的候选项。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Edge Source to Reduce")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _network_source { get; set; }


        /// <summary>
        /// <para>Expression</para>
        /// <para>An SQL expression used to select the subset of network edges among the edges that are candidates for the reduction based on the input template. For more information on SQL syntax, see the SQL reference for query expressions used in ArcGIS help topic.</para>
        /// <para>一个 SQL 表达式，用于在基于输入模板的边中选择作为缩减候选项的边的网络边的子集。有关 SQL 语法的详细信息，请参阅 ArcGIS 帮助中使用的查询表达式的 SQL 参考主题。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Expression")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _where_clause { get; set; } = null;


        /// <summary>
        /// <para>Description</para>
        /// <para>The description of the rule.</para>
        /// <para>规则的说明。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Description")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _description { get; set; } = null;


        /// <summary>
        /// <para>Output Network</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Network")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _out_utility_network { get; set; }


        /// <summary>
        /// <para>Output Diagram Template</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Diagram Template")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _out_template_name { get; set; }


        /// <summary>
        /// <para>Aggregate reconnected edges</para>
        /// <para><xdoc>
        ///   <para>Specifies whether the rule will aggregate the edges that are reconnected to the reduction junctions.
        ///   <bulletList>
        ///     <bullet_item>Unchecked—Any edge connecting a point along the edge that is reduced is reconnected to the reduction junction.  </bullet_item><para/>
        ///     <bullet_item>Checked—Any edge connecting a point along the edge that is reduced is replaced by a reduction edge. This reduction edge is reconnected to the reduction junction. This is the default.  </bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para><xdoc>
        /// <para>指定规则是否聚合重新连接到缩减交汇点的边。
        ///   <bulletList>
        ///     <bullet_item>未选中 - 沿缩减边连接点的任何边都将重新连接到缩减交汇点。</bullet_item><para/>
        ///     <bullet_item>选中 （Checked） - 沿缩减边连接点的任何边都将替换为缩减边。该约简边沿重新连接到约简结。这是默认设置。 </bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Aggregate reconnected edges")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _reconnected_edges_option_value _reconnected_edges_option { get; set; } = _reconnected_edges_option_value._true;

        public enum _reconnected_edges_option_value
        {
            /// <summary>
            /// <para>AGGREGATE_RECONNECTED_EDGES</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("AGGREGATE_RECONNECTED_EDGES")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>DONT_AGGREGATE_RECONNECTED_EDGES</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("DONT_AGGREGATE_RECONNECTED_EDGES")]
            [GPEnumValue("false")]
            _false,

        }

        public AddReduceEdgeByAttributeRule SetEnv()
        {
            base.SetEnv();
            return this;
        }

    }

}